import request from '@/utils/request'

export function list(data) {
  return request({
    url: '/outsource/order/list',
    method: 'post',
    data: data
  })
}

export function addOrUpdate(data) {
  return request({
    url: '/outsource/order/addOrEdit',
    method: 'post',
    data: data
  })
}
export function updateFile(data) {
  return request({
    url: '/outsource/order/updateFile',
    method: 'post',
    data: data
  })
}
export function endOrder(data) {
  return request({
    url: '/outsource/order/endOrder',
    method: 'post',
    data: data
  })
}

export function getInfo(data) {
  return request({
    url: '/outsource/order/' + data,
    method: 'get'
  })
}
export function getList(data) {
  return request({
    url: '/outsource/order/detail/listForInspect',
    method: 'post',
    data: data
  })
}
export function remove(data) {
  return request({
    url: '/outsource/order/delete',
    method: 'post',
    data: { deleteIds: data }
  })
}
export function getInfoBySupplierId(data) {
  return request({
    url: '/outsource/price/detail/by/' + data,
    method: 'get'
  })
}
export function getInfoBySupplierIdAndProcessId(data) {
  return request({
    url: '/outsource/price/detail/by/getInfoBySupplierIdAndProcessId',
    method: 'post',
    data: data
  })
}
export function getEngineeringRequirementsMaterialListByMaterialId(data) {
  return request({
    url: '/engineering/requirement/getEngineeringRequirementsMaterialListByMaterialId',
    method: 'post',
    data: data
  })
}
export function terminated(data) {
  return request({
    url: '/outsource/order/terminated/' + data,
    method: 'get'
  })
}
